import request from "@/utils/request"

// 查询返修单产品工序列列表
export function listRepairProductProcess(query) {
	return request({
		url: "/erp/repairProductProcess/list",
		method: "get",
		params: query
	})
}

export function listRepairProductProcess1(query) {
	return request({
		url: "/erp/repairProductProcess/list3",
		method: "get",
		params: query
	})
}

// 查询返修单产品工序列详细
export function getRepairProductProcess(id) {
	return request({
		url: "/erp/repairProductProcess/" + id,
		method: "get"
	})
}

// 新增返修单产品工序列
export function addRepairProductProcess(data) {
	return request({
		url: "/erp/repairProductProcess",
		method: "post",
		data: data
	})
}

// 修改返修单产品工序列
export function updateRepairProductProcess(data) {
	return request({
		url: "/erp/repairProductProcess",
		method: "put",
		data: data
	})
}

// 删除返修单产品工序列
export function delRepairProductProcess(id) {
	return request({
		url: "/erp/repairProductProcess/" + id,
		method: "delete"
	})
}

//
export function fillIn(data) {
	return request({
		url: "/erp/repairProductProcess/fillIn",
		method: "post",
		data
	})
}

//批量之间
export function fillIns(data) {
	return request({
		url: "/erp/repairProductProcess/fillIn1",
		method: "post",
		data
	})
}

// 导出

// export function fillIn(data) {
// 	return request({
// 		url: "/erp/repairProductProcess/fillIn",
// 		method: "post",
//     data
// 	})
// }
// 1.查询返修单产品列列表
export function productList(query) {
	return request({
		url: "/erp/repairProductProcess/productList",
		method: "get",
		params: query
	})
}

// 1.查询返修单产品工序列列表
export function list2(query) {
	return request({
		url: "/erp/repairProductProcess/list2",
		method: "get",
		params: query
	})
}

// 1.查询质检工序列表
export function list3(query) {
	return request({
		url: "/erp/repairProductProcess/list4",
		method: "get",
		params: query
	})
}

// 1.下一步数据
export function getProcessId(id) {
	return request({
		url: "/erp/repairProductProcess/getProcessId/" + id,
		method: "get"
	})
}
// 上一步数据
export function beforeProcessId(id) {
	return request({
		url: "/erp/repairProductProcess/getProcessId1/" + id,
		method: "get"
	})
}

// 外层项目列表
export function productList1(params) {
	return request({
		url: "/erp/repairProductProcess/productList1",
		method: "get",
		params
	})
}

// 批量质检

export function qualityBatch(data) {
	return request({
		url: "/erp/repairProductProcess/qualityBatch",
		method: "post",
		data
	})
}

export function getOption() {
	return request({
		url: "/erp/selectDown/workshopSectionlist?state=1",
		method: "get"
	})
}

// 工艺通知单附件
export function attachmentList(id) {
	return request({
		url: "/erp/repairProductProcess/attachmentList/"+id,
		method: "get"
	})
}


// 重置工序
export function replacement(id) {
	return request({
		url: "/erp/repairProductProcess/replacement/"+id,
		method: "get"
	})
}


// 根据返修单产品id获取返修产品工时统计详细信息
export function getrepairProduct(id) {
	return request({
		url: "/productWorkpoints/productWorkpoints/repairProduct/"+id,
		method: "get"
	})
}

// 工人下拉选

export function getworkList(id) {
	return request({
		url: "/erp/selectDown/sectionUser/"+id,
		method: "get"
	})
}

// 修改
export function submitproductWorkpoints(data) {
	return request({
		url: "/productWorkpoints/productWorkpoints",
		method: "put",
		data
	})
}
// 管理员修改

export function submitedit1(data) {
	return request({
		url: "/productWorkpoints/productWorkpoints/edit1",
		method: "put",
		data
	})
}
